home *** CD-ROM | disk | FTP | other *** search
- ; MUI_CD_Player Installer script
-
- ; Some procedures
-
- (procedure P_COPYINFO #infoname
- (copyfiles
- (prompt #copying)
- (source #infoname)
- (dest @default-dest)
- (help @copyfiles-help)
- (infos)
- )
- )
-
- (procedure P_DEVICEINFO
- (cat #dev (getenv "TSTDEV_DEVICE") "\n"
- #unit (getenv "TSTDEV_UNIT") "\n"
- #devtype (getenv "TSTDEV_DEVICETYPE") "\n"
- #commandset (getenv "TSTDEV_COMMANDSET") "\n"
- #vendor (getenv "TSTDEV_VENDOR") "\n"
- #product (getenv "TSTDEV_PRODUCT") "\n"
- #revision (getenv "TSTDEV_REVISION")
- )
- )
-
- (procedure P_FINDBYVOLUME #userlevel
- (if (= #userlevel 0)
- (set #ret (run "testdevice CD0: volume setvar"))
- (set #ret (run (cat "testdevice " (askstring (prompt #entercdname) (help @askstring-help) (default "CD0:")) " volume setvar")))
- )
-
- (if (= #ret 0)
- (if (= (getenv "TSTDEV_DEVICETYPE") "CD-ROM")
- (if (< #userlevel 2)
- (set #goon 1)
- (set #goon
- (askbool
- (prompt
- (cat #found "\n\n" (P_DEVICEINFO) "\n\n\n" #isok)
- )
- (help @askbool-help)
- (default 1)
- )
- )
- )
- (if (= #userlevel 0)
- (set #goon 0)
- (set #goon
- (askbool
- (prompt
- (cat #foundnotcd "\n\n" (P_DEVICEINFO) "\n\n\n" #isok)
- )
- (help @askbool-help)
- (default 1)
- )
- )
- )
- )
- ((set #goon 0) (message #notfound (all)))
- )
- )
-
- (procedure P_FINDBYDEVICE
- (
- (set #name
- (cat "testdevice NAME="
- (askstring (prompt #findbydev) (help @askstring-help)
- (default "atapi.device"))
- " "
- (askstring (prompt #unitnum) (help @askstring-help)
- (default ""))
- " setvar"
- )
- )
- (working #search)
- (set #ret (run #name))
- (if (= #ret 0)
- (if (< @user-level 2)
- (set #goon 1)
- (set #goon
- (askbool
- (prompt
- (cat #found "\n\n" (P_DEVICEINFO) "\n\n\n" #isok)
- )
- (help @askbool-help)
- (default 1)
- )
- )
- )
- (set #goon 0)
- )
- )
- )
-
- (procedure P_CONFIGURECD
- (working #search)
-
- (P_FINDBYVOLUME @user-level)
-
- (if (= #goon 0)
- (if (= @user-level 0)
- (P_FINDBYVOLUME 1)
- )
- )
-
- (if (= #goon 0)
- (P_FINDBYDEVICE)
- )
-
- (if (= #goon 0) (abort #notfound))
-
- (tooltype
- (dest (tackon @default-dest "MUI_CD_Player"))
- (settooltype "DEVICE" (getenv "TSTDEV_DEVICE"))
- (settooltype "UNIT" (getenv "TSTDEV_UNIT"))
- (settooltype "LIBRARY"
- (if (= (getenv "TSTDEV_COMMANDSET") "CD32") "CDPlayers/cddevplay.library" "CDPlayers/atapiplay.library")
- )
- )
- )
-
- (procedure P_COPYICON #filename
- (if (exists (tackon @default-dest #filename))
- (if (NOT (exists (tackon @default-dest (cat #filename ".info"))))
- (copyfiles
- (prompt #copying)
- (source (cat #filename ".info"))
- (dest @default-dest)
- (help @copyfiles-help)
- )
- )
- )
- )
-
- (procedure P_COPYDIR #directory
- (copyfiles
- (prompt #copying)
- (source #directory)
- (all)
- (dest (tackon @default-dest #directory))
- (help @copyfiles-help)
- )
- )
-
- (procedure P_COPYPLAYER #player
- (copylib
- (prompt #copying)
- (source (tackon "CDPlayers/" #player))
- (dest (tackon @default-dest "CDPlayers"))
- (help @copylib-help)
- (if (= @user-level 2) (confirm))
- )
- )
-
- (procedure P_MAKEDIR #directory
- (if (NOT (exists (tackon @default-dest #directory)))
- (makedir (tackon @default-dest #directory))
- )
- )
-
-
- ; Here the installation script begins
-
- (welcome)
-
- (set #language
- (if (= @language "polski") 1
- (if (= @language "deutsch") 2
- (if (= @language "italiano") 3 0)
- )
- )
- )
-
- ; * STRING TRANSLATIONS *
-
- ; English translation
-
- (select #language
- (
- (set #search "Searching for CD-ROM...")
- (set #found "Found a CD-ROM drive:")
- (set #dev "Device: ")
- (set #unit "Unit: ")
- (set #vendor "Vendor: ")
- (set #product "Product: ")
- (set #revision "Revision: ")
- (set #devtype "Device type: ")
- (set #commandset "Command set: ")
- (set #foundnotcd "Found a device which is probably not a CD-ROM:")
- (set #isok "Use this device ?")
- (set #notfound "Could not find a CD-ROM")
- (set #entercdname "Enter the name of your CD-ROM\n(eg. CD0, CD1, CDR etc.)")
- (set #findbydev "Let's try to find the CD-ROM differently.\nEnter the device name:")
- (set #unitnum "Enter unit number:\n(or leave it empty if you don't know the number)")
-
- (set #askdir "Select where MUI_CD_Player drawer should be created")
- (set #installprompt "Please confirm if you'd like to install these")
- (set #cds "Additional CDs in text files")
- (set #copying "Copying files...")
- (set #imagebutprompt "Which image buttons would you like to install ?")
- (set #askconf "Would you like to configure your CD-ROM now ?")
- (set #installtprompt "Please confirm if you'd like to install these translations")
- (set #excds "Example CDs to import")
- )
-
- ; Polish translation
-
- (
- (set #search "Szukam CD-ROMu...")
- (set #found "Znalazîem CD-ROM:")
- (set #dev "Urzâdzenie: ")
- (set #unit "Nr: ")
- (set #vendor "Producent: ")
- (set #product "Produkt: ")
- (set #revision "Wersja: ")
- (set #devtype "Typ urzâdzenia: ")
- (set #commandset "Zestaw komend: ")
- (set #foundnotcd "Znalazîem urzâdzenie, które prawdopodobnie nie jest CD-ROMem:")
- (set #isok "Czy mam uûyê tych danych ?")
- (set #notfound "Nie mogë znaleúê CD-ROMu")
- (set #entercdname "Wpisz nazwë CD-ROMu\(czyli np. CD0, CD1, CDR itp.)")
- (set #findbydev "Spróbujmy znaleúê CD-ROM w inny sposób.\nWpisz nazwë urzâdzenia:")
- (set #unitnum "Wpisz numer urzâdzenia:\n(albo pozostaw to pole puste jeôli nie znasz numeru)")
-
- (set #askdir "Wskaû miejsce gdzie mam utworzyê katalog MUI_CD_Player")
- (set #installprompt "Proszë zaznaczyê co chciaîbyô zainstalowaê")
- (set #cds "Dodatkowe kompakty w plikach tekstowych")
- (set #copying "Kopiujë pliki...")
- (set #imagebutprompt "Jakie przyciski chciaîbyô zainstalowaê ?")
- (set #askconf "Czy chciaîbyô teraz skonfigurowaê Twój CD-ROM ?")
- (set #installtprompt "Proszë zaznaczyê które jëzyki chciaîbyô zainstalowaê")
- (set #excds "Przykîadowe kompakty do zaimportowania")
- )
-
- ; German translation
-
- (
- (set #search "Suche nach einem CD-ROM...")
- (set #found "Es wurde ein CD-ROM Laufwerk gefunden:")
- (set #dev "Device: ")
- (set #unit "Unit: ")
- (set #vendor "Hersteller: ")
- (set #product "Produkt: ")
- (set #revision "Revision: ")
- (set #devtype "Geräte-Typ: ")
- (set #commandset "Befehlssatz: ")
- (set #foundnotcd "Es wurde ein Gerät gefunden, das vermutlich kein CD-ROM ist:")
- (set #isok "Dieses Gerät verwenden?")
- (set #notfound "Ein CD-ROM konnte nicht gefunden werden")
- (set #entercdname "Geben Sie den Namen Ihres CD-ROM ein\n(z.B. CD0, CD1, CDR etc.)")
- (set #findbydev "Wir versuchen jetzt, das CD-ROM auf eine andere Weise zu finden.\nGeben Sie den Device-Namen ein:")
- (set #unitnum "Geben Sie die Unit-Nummer ein:\n(oder lassen Sie das Feld leer, falls Sie die Nummer nicht wissen)")
-
- (set #askdir "Wählen Sie, wo die MUI_CD_Player-Schublage erzeugt werden soll")
- (set #cds "Zusätzliche CDs in Text-Dateien")
- (set #copying "Kopiere Dateien...")
- (set #imagebutprompt "Welche Symbole für die Knöpfe möchten Sie installieren?")
- (set #askconf "Möchten Sie MUI CD jetzt für Ihr CD-ROM konfigurieren?")
- (set #installprompt "Please confirm if you'd like to install these")
- (set #installtprompt "Please confirm if you'd like to install these translations")
- (set #excds "Example CDs to import")
- )
-
-
- ; Italian translation
-
- (
- (set #search "Ricerco il tuo CD-ROM...")
- (set #found "Trovato drive CD-ROM :")
- (set #dev "Dispositivo: ")
- (set #unit "Unita`: ")
- (set #vendor "Venditore: ")
- (set #product "Prodotto: ")
- (set #revision "Revisione: ")
- (set #devtype "Tipo Dispositivo: ")
- (set #commandset "Comandi disponibili: ")
- (set #foundnotcd "Il dispositivo trovato probabilmente non e` un CD-ROM:")
- (set #isok "Devo usare questo dispositivo ?")
- (set #notfound "Non riesco a trovare un CD-ROM")
- (set #entercdname "Digita il nome del tuo CD-ROM\n(es. CD0, CD1, CDR ecc.)")
- (set #findbydev "Cerco di trovare il CD-ROM in altro modo.\nDigita nome dispositivo:")
- (set #unitnum "Digita numero unita`:\n(o lascialo vuoto se non lo conosci !)")
-
- (set #askdir "Seleziona dove vuoi creare il cassetto per MUI_CD_Player")
- (set #installprompt "Prego, conferma se vuoi installare anche questi")
- (set #cds "CDs addizionali in formato testo")
- (set #copying "Copio files...")
- (set #imagebutprompt "Quali immagini vuoi installare per i pulsanti ?")
- (set #askconf "Vuoi configurare il tuo CD-ROM adesso ?")
- (set #installtprompt "Prego, conferma se vuoi installare queste traduzioni")
- (set #excds "Esempio di CDs da importare")
- )
-
- )
-
- (if (> @user-level 0)
- (set #destdir
- (askdir
- (prompt #askdir)
- (help @askdir-help)
- (default @default-dest)
- )
- )
- (set #destdir @default-dest)
- )
-
- (P_MAKEDIR "MUI_CD_Player")
- (if (NOT (exists (tackon @default-dest "MUI_CD_Player.info")))
- (copyfiles
- (prompt #copying)
- (source "/MUI_CD_Player.info")
- (dest @default-dest)
- (help @copyfiles-help)
- )
- )
-
- (set @default-dest (tackon #destdir "MUI_CD_Player"))
-
- (P_MAKEDIR "Programs")
- (P_MAKEDIR "Disks")
- (P_MAKEDIR "Images")
- (P_MAKEDIR "Catalogs")
-
- (set opts
- (if (> @user-level 0)
- (askoptions
- (prompt #installtprompt)
- (help @askoptions-help)
- (choices "English" "Polski" "Deutch" "Italiano" "Hrvatski" "Français")
- (default (BITOR (shiftleft 1 #language) 1))
- )
- (BITOR (shiftleft 1 #language) 1)
- )
- )
-
- (set opts2
- (if (> @user-level 0)
- (askoptions
- (prompt #installprompt)
- (help @askoptions-help)
- (choices #excds #cds)
- (default 3)
- )
- 3
- )
- )
-
- (if (IN opts 0)
- (copyfiles
- (prompt #copying)
- (source "MUI_CD_Player.guide")
- (dest @default-dest)
- (help @copyfiles-help)
- (infos)
- )
- )
-
- (if (IN opts 1)
- (
- (P_COPYINFO "MUI_CD_Player.pl.guide")
- (P_COPYDIR "catalogs/polski")
- )
- )
-
- (if (IN opts 2)
- (
- (P_COPYINFO "MUI_CD_Player.de.guide")
- (P_COPYDIR "catalogs/deutsch")
- )
- )
-
- (if (IN opts 3)
- (P_COPYDIR "catalogs/italiano")
- )
-
- (if (IN opts 4)
- (P_COPYDIR "catalogs/hrvatski")
- )
-
- (if (IN opts 5)
- (P_COPYDIR "catalogs/français")
- )
-
- (if (IN opts2 0)
- (copyfiles
- (prompt #copying)
- (source "CDs.MCD")
- (dest @default-dest)
- (help @copyfiles-help)
- )
- )
- (if (IN opts2 1) (P_COPYDIR "Texts"))
-
- (P_COPYINFO "RELEASE NOTES")
-
- (copyfiles
- (prompt #imagebutprompt)
- (source "Images")
- (all)
- (dest (tackon @default-dest "Images"))
- (help @copyfiles-help)
- (confirm 1)
- )
-
- (P_COPYPLAYER "atapiplay.library")
- (P_COPYPLAYER "cddevplay.library")
-
- (copyfiles
- (prompt #copying)
- (source "")
- (choices "MUI_CD_Player" "CD_Manager" "CD_Editor")
- (dest @default-dest)
- (help @copyfiles-help)
- (if (= @user-level 2) (confirm))
- )
-
- (copyfiles
- (prompt #copying)
- (source "")
- (choices "testdevice" "Configure CD-ROM")
- (dest @default-dest)
- (help @copyfiles-help)
- (if (= @user-level 2) (confirm))
- )
-
- (P_COPYICON "MUI_CD_Player")
- (P_COPYICON "CD_Manager")
- (P_COPYICON "Configure CD-ROM")
-
- (if (= @user-level 0)
- (P_CONFIGURECD)
- (if
- (askbool
- (prompt #askconf)
- (help @askbool-help)
- (default 1)
- )
- (P_CONFIGURECD)
- )
- )
-
- (run "avail >nil: flush")
-
- (exit)
-